package com.management.vtribe.mapper;

import com.management.vtribe.Bean.Article;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

public interface ArticleMapper {
    List<Article> getAllArticle(int start,int num);
    List<Article> getAllArticleByState(String state,int start,int num);
    List<Article> getArticleByTitle(String title);
    List<Article> getArticleByTS(String title,String state);

    int getAllArticleCount();
    int getStateArticleCount(String state);

    int updateStateById(int[] ids,String state);
    int deleteArticleInfoById(int[] ids);
    int deleteArticleContentById(int[] ids);

    int updateTCById(int id,String title,int cid);
    int updateContentById(int id,String content);

    int insertArticleInfo(String title,int author,int category,String state);
    int insertArticleContent(String content);

    int deleteArticleByAuthor(int author);
    List<Integer> selectIdByAuthor(int author);

    List<String> getCategories();
    void pvStatisticsPerDay();
    List<Integer> getDataStatistics();
    int pvIncrements(@Param("pv") Map<Integer,Integer> pv);
}
